package com.atguigu.spzx.manager.service;

import com.atguigu.spzx.model.dto.system.AssginRoleDto;
import com.atguigu.spzx.model.dto.system.LoginDto;
import com.atguigu.spzx.model.dto.system.SysUserDto;
import com.atguigu.spzx.model.entity.system.SysUser;
import com.atguigu.spzx.model.vo.system.LoginVo;
import com.github.pagehelper.PageInfo;

/**
 * ClassName: SysUserService
 * Package:
 * Description:
 *
 * @Author:xiaohei
 * @Create 2024/5/16 23:12
 * Version 1.0
 */
public interface SysUserService {

    /**
     * 登录方法
     * @param loginDto
     * @return
     */
    LoginVo login(LoginDto loginDto);

    /**
     * 获取当前用户登录信息
     * @param token
     * @return
     */
    SysUser getUserInfo(String token);

    /**
     * 用户退出
     * @param token
     */
    void logout(String token);

    PageInfo<SysUser> findByPage(Integer pageNum, Integer pageSize, SysUserDto sysUserDto);

    void saveSysUser(SysUser sysUser);

    void updateSysUser(SysUser sysUser);

    void deleteById(Integer userId);

    void doAssign(AssginRoleDto assginRoleDto);
}
